import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';

// ignore: must_be_immutable
class MyButton extends StatelessWidget {
  Widget icon;
  GestureTapCallback pressed;
  double padding;
  Widget  label;

  MyButton(
      {Key key, this.label,
      @required this.icon,
      this.pressed,
      this.padding = 2});

  @override
  Widget build(BuildContext context) {

    return GestureDetector(
      child: Container(
          child: new Row(
            mainAxisAlignment: MainAxisAlignment.end,
        children: <Widget>[label, icon],
      )),
      onTap: pressed,
    );
  }
}
